#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
@Time    : 24-5-24 下午15:37
@Author  : zhangweihao
@File    : tasks.py
'''
from ext.base_form import BaseForm
from wtforms.fields import StringField, SelectField, SelectMultipleField, DateTimeField, IntegerField
from wtforms.validators import DataRequired, Length
from utils.date_process import DateProcess
TRAIN_TYPE_LIST = ['all', 'level', 'data_size', 'identity', 'property', 'account', 'credit', 'financial',
                               'authentication', 'derived', 'reputational', 'encrypted']

class AImodelForm(BaseForm):
    train_type = StringField('模型类型') 

    def validate_train_type(self, field):
        if field.data not in TRAIN_TYPE_LIST:
            raise ValueError('模型类型有误')

class AbnormalPrivacyDataGetForm(BaseForm):
    destination_ip = StringField('接收ip') 
    type = StringField('类型') 
    handle_status = StringField('处理状态')
    start_time = DateTimeField('开始时间')
    end_time = DateTimeField('结束时间')
    source_ips = StringField('敏感源ip')
    page = StringField('page', default=1)
    limit = StringField('limit', default=10)

class AbnormalPrivacyDataPostForm(BaseForm):
    ids = StringField('id') 
    set_status = StringField('处理状态')
    remark = StringField('描述')
